package com.fx.service;

import com.fx.entity.OrderInfo;
import com.github.binarywang.wxpay.bean.notify.WxPayNotifyResponse;
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
import com.github.binarywang.wxpay.bean.result.WxPayRefundResult;
import com.github.binarywang.wxpay.bean.result.WxPayUnifiedOrderResult;
import com.github.binarywang.wxpay.exception.WxPayException;

import java.util.List;
import java.util.Map;

/**
 * 
 * 
 * @author yfl
 * @email 617823298@qq.com
 * @date 2018-06-19 16:13:32
 */
public interface OrderInfoService {
	
	OrderInfo getById(String flId);
	
	List<OrderInfo> getList(Map<String, Object> map);
	
	int getCount(Map<String, Object> map);
	
	int save(OrderInfo orderInfo);
	
	int updateById(OrderInfo orderInfo);
	
	int remove(String flId);
	
	int batchRemove(String[] flIds);

    List<OrderInfo> getOrderByUserId(String userId);

    OrderInfo generalOrder(String id, String userId);

	Map<String,String> orderPayment(String orderId, String clientIp,String serverUrl) throws WxPayException, Exception;

    WxPayRefundResult refund(String orderId) throws WxPayException;

	WxPayNotifyResponse payResultNotify(WxPayOrderNotifyResult notifyResult);
}
